<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="../Public/Css/userp.css" />
<script type="text/javascript" src='../Public/Js/jquery.js'></script>
<script type="text/javascript">
	function showPic(path,showId){
		alert(path);
		alert($("#"+showId));
		$("#"+showId).attr('src',path);
	}
</script>
</head>
<body>
<div class="content">

	<div class="pos">
		<div class="posDe">当前位置 : <font style="color:blue;">广告管理&gt;管理广告</font></div>
	</div>
	<div>
	<div id="advm">
		<table width="900px" >
			<tr><th></th><th>广告编号</th><th>显示位置</th><th>广告标题</th><th>广告链接地址</th><th>广告添加时间</th><th>广告结束时间</th><th>是否过期</th><th>广告图片</th><th>操作</th></tr>
			<{foreach from=$advData item=v}>
			<tr>
				<td><img src='../Public/Images/off.gif' /></td>
				<td><{$v.adv_id}></td>
				<td>
					<{if $v.adv_position eq 0}>
						上
					<{elseif $v.adv_position eq 1}>
						中
					<{else}>
						下
					<{/if}>
				</td>
				<td><{$v.adv_name}></td>
				<td><{$v.adv_link}></td>
				<td><{"Y-m-d"|date:$v.adv_addtime}></td>
				<td><{"Y-m-d"|date:$v.adv_endtime}></td>
				<td>
				<{if $v.timeflag eq 1}>
					<font style="color:red;">过期</font>
				<{else}>
					<font style="color:green;">未过期</font>
				<{/if}>
				</td>
				<td><button onclick="showPic('<{$v.adv_pic}>','advmpic')">查看图片</button></td>
				<td><a href="AdvM.php?flag=advdelete&id=<{$v.adv_id}>">[删除]</a></td>
			</tr>

			<{foreachelse}>
				<tr><td colspan='10'>暂时关于广告的记录！</td></tr>
			<{/foreach}>
		</table>
		<div >
			<img id="advmpic" src=""/>
		</div>
	</div>
	
</div>

</body>
</html>